<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="moduleEdit" />
	<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
	<script type="text/javascript">
	$(document).ready(function() {
		
		 $("#intAssterminateForm").validate({
			submitHandler: function(form){
				Oosp_Loading('正在提交，请稍等...');
				form.submit();
			},
			errorContainer: "#messageBox",
			errorPlacement: function(error, element) {
				$("#messageBox").text("输入有误，请先更正。");
				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
					error.appendTo(element.parent().parent());
				} else {
					error.insertAfter(element);
				}
			}
		}); 
		$("#saveAssociated").click(function (){
			$("#intAssterminateForm").submit();
		});
	});
	
	</script>
	
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">修改合同作废意向流程
						<a class="btn btn-default btn-sm pull-right" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
				    </h3>
				  </div>
				  <div class="panel-body">
					 <form id="intAssterminateForm" action="${contextPath}/biz/intent/intAssdiscard/save" method="post" class="form-horizontal">
					 	<input type="hidden" id="contractId" name="contractId" value="${intAssdiscard.contractId}">
					 	<input type="hidden" id="status" name="status" value="${intAssdiscard.status}">
						<div class="form-group">
							<label  class="col-sm-2 control-label">意向单号:</label>
							<div class="col-sm-4">
								<input type="text" class="form-control required" id="intentNo" name="intentNo" value="${intAssdiscard.intentNo}">
							</div>
							<div class="col-sm-4 pull-right">
								<input type="text" class="form-control required" id="dept" name="dept" value="${intAssdiscard.dept}">
							</div>
							<label class="col-sm-2 control-label pull-right">合同编号:</label>	
						</div>
						<div class="form-group">
							<input type="hidden" id="areaId" name="areaId" value="${intAssdiscard.areaId}">
							<label class="col-sm-2 control-label ">区域:</label>
							<div class="col-sm-4">
								<%-- <ossp:select dictType="city" id="area" name="area" class_="form-control required"></ossp:select> --%>
								<input type="text" class="form-control required" id="area" name="area" value="${intAssdiscard.area}">
							</div>
							<div class="col-sm-4 pull-right" >
								<%-- <ossp:select dictType="city" id="store"  name="store" class_="form-control required"></ossp:select> --%>
								<input type="text" class="form-control required" id="store" name="store" value="${intAssdiscard.store}">
							</div>
							<input type="hidden" id="storeId" name="storeId" value="${intAssdiscard.storeId}">
							<label class="col-sm-2 control-label pull-right">门店:</label>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">楼层:</label>
							<input type="hidden" id="floorId" name="floorId" value="${intAssdiscard.floorId}">
							<div class="col-sm-4">
								<%-- <ossp:select dictType="city" id="floor" name="floor" class_="form-control required"></ossp:select> --%>
								<input type="text" class="form-control required" id="floor" name="floor" value="${intAssdiscard.floor}">
							</div>
							<div class="col-sm-4 pull-right">
								<input type="text" class="form-control required" id="shopNo" name="shopNo" value="${intAssdiscard.shopNo}">
							</div>
							<input type="hidden" id="shopId" name="shopId">
							<label class="col-sm-2 control-label pull-right">商铺号:</label>				
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">供应商编码:</label>
							<input type="hidden" id="supplierId" name="supplierId"> 
							<div class="col-sm-4">
								<%-- <ossp:select dictType="city" id="floor" name="floor" class_="form-control required"></ossp:select> --%>
								<input type="text" class="form-control required" id="supplierNo" name="supplierNo"  value="${intAssdiscard.supplierNo}">
							</div>
							<div class="col-sm-4 pull-right">
								<input type="text" class="form-control required" id="supplierName" name="supplierName" value="${intAssdiscard.supplierName}">
							</div>
							<label class="col-sm-2 control-label pull-right">供应商名称:</label>				
						</div>
						<div class="form-group">
							<label for="discardReason" class="col-sm-2 control-label">作废原因声明:</label>
							<div class="col-sm-10">
								<textarea class="form-control required" rows="10" name="discardReason" id="discardReason">${intAssdiscard.discardReason}</textarea>
							</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="createBy" class="col-sm-4 control-label">提报人:</label>
								<div class="col-sm-6">
									<input type="text" class="form-control required" id="createBy" name="createBy" value="${intAssdiscard.createBy}" >
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="createTime" class="col-sm-4 control-label">提报时间:</label>
								<div class="col-sm-8">
								<div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd hh:ii">
									<input class="form-control required" type="text" id="createTime" name="createTime" value="${intAssdiscard.createTime}"/>
									<span class="input-group-addon"><i class="glyphicon glyphicon-remove"></i></span>
    								<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						 	</div>
						</div>
						<div class="form-group">
						 	<div class="col-sm-6">
							    <label for="createBy" class="col-sm-4 control-label">最后修改人:</label>
								<div class="col-sm-6">
									
									<input type="text" class="form-control required" id="updateBy" name="updateBy" value="${intAssdiscard.updateBy}">
								</div>
						  	</div>
						  	<div class="col-sm-6">
							    <label for="createTime" class="col-sm-4 control-label">最后修改时间:</label>
								<div class="col-sm-8">
								<div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd hh:ii">
									<input class="form-control required" type="text" id="updateTime" name="updateTime" value="${intAssdiscard.updateTime}"/>
									<span class="input-group-addon"><i class="glyphicon glyphicon-remove"></i></span>
    								<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
								</div>
							</div>
						</div>
						</div>	
					</form>
				  </div>
				</div>			
			</div>
			<div class="form-group">
						  <div class="col-sm-offset-2 col-sm-10">
						    <input class="btn btn-primary " id="saveAssociated" type="button" value="提交意向"/>
							<input class="btn btn-default " type="button" value="返 回" onclick="history.go(-1)"/>
						  </div>
						</div>
			</div>
		</div>
	</div>
	<script src="${staticPath}/lib/datetimepicker/0.0.11/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/datetimepicker/0.0.11/js/locales/bootstrap-datetimepicker.zh-CN.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/chosen/1.1.0/chosen.jquery.js" type="text/javascript"></script>
	<script src="${staticPath}/js/ossp-jquery-chosen.js" type="text/javascript"></script>
	<script src="${staticPath}/lib/accounting/0.3.2/accounting.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(".o-a-form-date").datetimepicker({
	        language:  'zh-CN',
	        autoclose: true,
	        minView: 2,
	        todayBtn:  1,
	        pickerPosition: "bottom-left"
	    });
		$(".o-a-form-datetime").datetimepicker({
	        language:  'zh-CN',
	        autoclose: true,
	        pickerPosition: "bottom-left"
	    });
		$(".o-a-form-time").datetimepicker({
	        language:  'zh-CN',
			autoclose: 1,
			startView: 1,
			maxView: 1,
	        pickerPosition: "bottom-left"
	    });
		$(document).ready(function (){
			$(".chosen-select").chosen({});
			//货币格式化
			$('[data-accounting]').each(function (){
				var $this = $(this);
				if($this.attr("data-accounting-precision") && ""!=$this.attr("data-accounting-precision")){
					$this.html(accounting.formatMoney($this.attr("data-accounting"),"¥ ",$this.attr("data-accounting-precision")*1));
				}else{
					$this.html(accounting.formatMoney($this.attr("data-accounting"),"¥ "));
				}
			});
			;
		});
	</script>
</body>
</html>